home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / qwik40.arc / QWIK40.PAS < prev    next >
Pascal/Delphi Source File  |  1991-01-09  |  4KB  |  98 lines

  1. { QWIK.PAS - Unit for quick, direct screen writing          ver 4.0, 12-01-87 }
  2.  
  3. UNIT Qwik;
  4.  
  5. INTERFACE
  6. var
  7.   VideoMode:   byte    absolute $0040:$0049; { Video mode: Mono=7, Color=0-3 }
  8.   VideoPage:   byte    absolute $0040:$0062; { Video page number }
  9.   EgaRows:     byte    absolute $0040:$0084; { Rows on screen (0-based) }
  10.   EgaFontSize: word    absolute $0040:$0085; { Character cell height (1-based)}
  11.   EgaInfo:     byte    absolute $0040:$0087; { EGA info.  See QINIT.DOC }
  12.   CRTcolumns:  word    absolute $0040:$004A; { Number of CRT columns (1-based)}
  13.  
  14.   SystemID,                   { Equipment ID.  See QINIT.DOC }
  15.   SubModelID,                 { Equipment ID.  See QINIT.DOC }
  16.   CRTrows,                    { Global variable of Rows/EgaRows (1-based!)}
  17.   CRTcols:     byte;          { Global variable of CRTcolumns (1-based) }
  18.   CardSeg,                    { Segment for page 0 for video card }
  19.   Page0seg,                   { Segment for page 0 for video card/buffer }
  20.   Qseg:        word;          { Segment for Q writing }
  21.   MaxPage:     byte;          { Maximum possible page }
  22.   CardSnow,                   { Wait-for-retrace (snow) for video card }
  23.   Qsnow,                      { Wait-for-retrace (snow) while Q writing }
  24.   HavePS2,                    { Using some type of IBM PS/2 equip }
  25.   Have3270:    boolean;       { Using IBM 3270 PC workstation hard/software }
  26.   EgaSwitches,                { EGA card and monitor setup }
  27.   ActiveDispDev,              { Active Display Device }
  28.   ActiveDispDev3270,          { Active Display Device for IBM 3270 PC }
  29.   AltDispDev:    byte;        { Alternate Display Device }
  30.   AltDispDevPCC: word;        { Alt Display Device for PC Convertible }
  31.   HercModel:     byte;        { Model of Hercules card. }
  32.  
  33. const
  34.   { Constants assigned by IBM:      }   { Arbitrarily assigned constants: }
  35.   NoDisplay = $00;   VgaMono   = $07;   NoHerc       = 0;
  36.   MdaMono   = $01;   VgaColor  = $08;   HgcMono      = 1;
  37.   CgaColor  = $02;   DCC9      = $09;   HgcPlus      = 2;
  38.   DCC3      = $03;   DCC10     = $0A;   HercInColor  = 3;
  39.   EgaColor  = $04;   McgaMono  = $0B;
  40.   EgaMono   = $05;   McgaColor = $0C;
  41.   PgcColor  = $06;   Unknown   = $FF;
  42.  
  43. procedure  Qinit;
  44.  
  45. procedure  Qwrite  (Row, Col: byte; Attr: integer; aStr: string);
  46. procedure  QwriteC (Row, ColL, ColR: byte; Attr: integer; aStr: string);
  47. procedure  QwriteA (Row, Col: byte; Attr: integer; ArrayLength: word; VAR aStr);
  48.  
  49. procedure  Qfill  (Row,Col,Rows,Cols: byte; Attr: integer; Ch: char);
  50. procedure  Qattr  (Row,Col,Rows,Cols: byte; Attr: integer);
  51. procedure  QfillC (Row,ColL,ColR,Rows,Cols: byte; Attr: integer; Ch: char);
  52. procedure  QattrC (Row,ColL,ColR,Rows,Cols: byte; Attr: integer);
  53.  
  54. procedure  QstoreToMem (Row,Col,Rows,Cols: byte; VAR Dest);
  55. procedure  QstoreToScr (Row,Col,Rows,Cols: byte; VAR Source);
  56.  
  57. procedure  QviewPage  (PageNum: byte);
  58. procedure  QwritePage (PageNum: byte);
  59.  
  60. procedure  GotoRC (Row, Col: byte);
  61. procedure  CursorChange (New: word; VAR Old: word);
  62. procedure  CursorOff;
  63. procedure  CursorOn;
  64. function   WhereR:  byte;
  65. function   WhereC:  byte;
  66.  
  67. IMPLEMENTATION
  68.   {$L qinit.obj}
  69.   const
  70.     FirstQinit: boolean = true;  { True if Qinit is yet to be run }
  71.   procedure  Qinit;          external;
  72.   {$L qwrites.obj}
  73.   procedure  Qwrite;         external;
  74.   procedure  QwriteC;        external;
  75.   procedure  QwriteA;        external;
  76.   {$L qfills.obj}
  77.   procedure  Qfill;          external;
  78.   procedure  Qattr;          external;
  79.   procedure  QfillC;         external;
  80.   procedure  QattrC;         external;
  81.   {$L qstores.obj}
  82.   procedure  QstoreToMem;    external;
  83.   procedure  QstoreToScr;    external;
  84.   {$L qpages.obj}
  85.   procedure  QviewPage;      external;
  86.   procedure  QwritePage;     external;
  87.   {$L cursor.obj}
  88.   procedure  GotoRC;         external;
  89.   procedure  CursorChange;   external;
  90.   procedure  CursorOff;      external;
  91.   procedure  CursorOn;       external;
  92.   function   WhereR;         external;
  93.   function   WhereC;         external;
  94.  
  95. BEGIN
  96.   Qinit;
  97. END.
  98.